package com.csw.foodRecommendation.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csw.foodRecommendation.dao.RecDao;
import com.csw.foodRecommendation.entity.Rec;

/**
 * @author 1
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RecServiceImpl implements RecService {
	@Autowired
	private RecDao recDao;

	@Override
	public Rec queryByName(String name, String id) {
		return recDao.queryByName(name, id);
	}

	@Override
	public void add(Rec rec) {
		recDao.add(rec);
	}

	@Override
	public void update(Rec rec) {
		recDao.update(rec);
	}

	@Override
	public List<Rec> queryByCcc(String id) {
		return recDao.queryByCcc(id);
	}
}
